package com.kob.design.factoy_method;

/**
 * @Description: TODO
 * @Author: fyt
 * @Date: 2024/4/15 15:29
 **/
public class CoffeeStore {
    private CoffeeFactory factory;
    public void setFactory(CoffeeFactory factory){
        this.factory=factory;
    }
    //点咖啡
    public Coffee orderCoffee(){
        Coffee coffee = factory.createCoffee();
        coffee.addMilk();
        coffee.addSugar();
        return coffee;
    }
}
